//
//  JLCallMeModel.m
//  JiuLe
//
//  Created by xcq on 16/1/8.
//  Copyright © 2016年 Fine. All rights reserved.
//

#import "JLCallMeModel.h"

@implementation JLCallMeModel
- (instancetype)initWithTime:(NSString *)time
                        Type:(NSString *)type
                      userId:(NSString *)userId {
    if (self == [super init]) {
        _time = time;
        _type = type;
        _userid = userId;
    }
    return self;
}

-(NSComparisonResult)comparePerson:(JLCallMeModel *)model {
    //默认按年龄排序
    NSComparisonResult result = [[NSNumber numberWithInt:[self.type intValue]] compare:[NSNumber numberWithInt:[model.type intValue]]];//注意:基本数据类型要进行数据转换
    //如果年龄一样，就按照名字排序
    return result;
}

- (NSString *)description {
    return [NSString stringWithFormat:@"type : %@ , time : %@  , userid : %@ ",self.type , self.time , self.userid];
}
@end
